package com.fkdx.common.sequence;

import com.fkdx.common.utils.DateUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.function.Supplier;

@Getter
@AllArgsConstructor
public enum BusinessSequenceEnum {
     //* 入库业务单号由12位数字组成,第1-2位为业务代码(14代表粮 食入库),第3-8位依次为年份 的后两位、2位月份、2位日期,后四位为顺序码。例如：141605041234
    DISK_VIDEO("diskVideo", () -> DateUtil.getYYYYMMDD(), 3, "硬盘录像机"),

    ;


    private String name;

    private Supplier<String> format;

    private int suffixLength;

    private String desc;
    public void setName(String name) {
        this.name = name;
    }

    public String getFormat() {
        return format.get();
    }
}
